package org.darkforest.merchant.constants;

/**
 * 分页信息类
 * 
 * @author sd1009
 * 
 */
public class Pagination {
	private int currentIndex = 1;   //跳转的页数点上一页，下一页，首页默认为1 点击尾页则为maxpage，跳转则为输入的页数
	private int pageSize = 10;      //每页条数
	private int maxPage = Integer.MAX_VALUE;  //最大页数
	private int maxCount;                    //最大记录数
	private String actionName;
	public int getCurrentIndex() {
		return currentIndex;
	}

	public void setCurrentIndex(int currentIndex) {
		if (currentIndex < 1)
			currentIndex = 1;
		this.currentIndex = currentIndex;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getMaxPage() {
		return maxPage;
	}

	public void setMaxPage(int maxPage) {
		this.maxPage = maxPage;
		if (currentIndex > maxPage)
			setCurrentIndex(maxPage);
	}
	public int getMaxCount() {
		return maxCount;
	}

	public void setMaxCount(int maxCount) {
		this.maxCount = maxCount;
	}

	public String getActionName() {
		return actionName;
	}

	public void setActionName(String actionName) {
		this.actionName = actionName;
	}
}
